The present invention relates to representations of computer programs. More specifically, the present invention relates to representations of mobile applications or web applications as finite state machines with data flow edges. Program analysis plays an important role in a variety of software engineering processes, such as automated code refactoring, compiler optimizations, and program slicing. The internal program representation used by a program analysis algorithm affects the power and efficiency of the analysis.